package com.rc.saas.tenant.service.ugs;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.mapper.ugs.TenantUgsLevelDiscountRecordMapper;
import com.rc.saas.tenant.search.ugs.LevelDiscountRecordSearch;
import com.rc.saas.tenant.vo.ugs.TenantUgsLevelDiscountRecordResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author frog
 * @date 2021/4/8
 */
@Service
public class TenantUgsLevelDiscountRecordServiceImpl implements TenantUgsLevelDiscountRecordService {

    @Autowired
    private TenantUgsLevelDiscountRecordMapper tenantUgsLevelDiscountRecordMapper;

    @Override
    public TenantUgsLevelDiscountRecordMapper getMapper() {
        return tenantUgsLevelDiscountRecordMapper;
    }

    @Override
    public PageInfo<TenantUgsLevelDiscountRecordResultVo> listPageModifyRecord(LevelDiscountRecordSearch levelDiscountRecordSearch) {
        PageHelper.startPage(levelDiscountRecordSearch.getOffset(), levelDiscountRecordSearch.getLimit());
        List<TenantUgsLevelDiscountRecordResultVo> levelDiscountStationResultVos = tenantUgsLevelDiscountRecordMapper.listPageLevelDiscountStation(levelDiscountRecordSearch);
        return new PageInfo<TenantUgsLevelDiscountRecordResultVo>(levelDiscountStationResultVos);
    }
}
